package com.ek.distmpl.dao.mapper;

import com.ek.distmpl.dao.model.Activity;
import com.ek.distmpl.dao.model.ActivityExample;
import com.ek.distmpl.dao.model.ActivityWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ActivityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ActivitySqlProvider.class, method="countByExample")
    long countByExample(ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @DeleteProvider(type=ActivitySqlProvider.class, method="deleteByExample")
    int deleteByExample(ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Delete({
        "delete from activity",
        "where activity_aid = #{activityAid,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(String activityAid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Insert({
        "insert into activity (activity_aid, activity_uid, ",
        "cover_name, atitle, ",
        "acreate, activity_status, ",
        "activity_hids, activity_vids, ",
        "cover, acontext)",
        "values (#{activityAid,jdbcType=CHAR}, #{activityUid,jdbcType=CHAR}, ",
        "#{coverName,jdbcType=VARCHAR}, #{atitle,jdbcType=VARCHAR}, ",
        "#{acreate,jdbcType=VARCHAR}, #{activityStatus,jdbcType=INTEGER}, ",
        "#{activityHids,jdbcType=LONGVARCHAR}, #{activityVids,jdbcType=LONGVARCHAR}, ",
        "#{cover,jdbcType=LONGVARBINARY}, #{acontext,jdbcType=LONGVARCHAR})"
    })
    int insert(ActivityWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @InsertProvider(type=ActivitySqlProvider.class, method="insertSelective")
    int insertSelective(ActivityWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ActivitySqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="activity_aid", property="activityAid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="activity_uid", property="activityUid", jdbcType=JdbcType.CHAR),
        @Result(column="cover_name", property="coverName", jdbcType=JdbcType.VARCHAR),
        @Result(column="atitle", property="atitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="acreate", property="acreate", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_status", property="activityStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="activity_hids", property="activityHids", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="activity_vids", property="activityVids", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="cover", property="cover", jdbcType=JdbcType.LONGVARBINARY),
        @Result(column="acontext", property="acontext", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<ActivityWithBLOBs> selectByExampleWithBLOBs(ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ActivitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="activity_aid", property="activityAid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="activity_uid", property="activityUid", jdbcType=JdbcType.CHAR),
        @Result(column="cover_name", property="coverName", jdbcType=JdbcType.VARCHAR),
        @Result(column="atitle", property="atitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="acreate", property="acreate", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_status", property="activityStatus", jdbcType=JdbcType.INTEGER)
    })
    List<Activity> selectByExample(ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Select({
        "select",
        "activity_aid, activity_uid, cover_name, atitle, acreate, activity_status, activity_hids, ",
        "activity_vids, cover, acontext",
        "from activity",
        "where activity_aid = #{activityAid,jdbcType=CHAR}"
    })
    @Results({
        @Result(column="activity_aid", property="activityAid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="activity_uid", property="activityUid", jdbcType=JdbcType.CHAR),
        @Result(column="cover_name", property="coverName", jdbcType=JdbcType.VARCHAR),
        @Result(column="atitle", property="atitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="acreate", property="acreate", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_status", property="activityStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="activity_hids", property="activityHids", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="activity_vids", property="activityVids", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="cover", property="cover", jdbcType=JdbcType.LONGVARBINARY),
        @Result(column="acontext", property="acontext", jdbcType=JdbcType.LONGVARCHAR)
    })
    ActivityWithBLOBs selectByPrimaryKey(String activityAid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ActivitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ActivityWithBLOBs record, @Param("example") ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ActivitySqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") ActivityWithBLOBs record, @Param("example") ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ActivitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Activity record, @Param("example") ActivityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ActivitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(ActivityWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update activity",
        "set activity_uid = #{activityUid,jdbcType=CHAR},",
          "cover_name = #{coverName,jdbcType=VARCHAR},",
          "atitle = #{atitle,jdbcType=VARCHAR},",
          "acreate = #{acreate,jdbcType=VARCHAR},",
          "activity_status = #{activityStatus,jdbcType=INTEGER},",
          "activity_hids = #{activityHids,jdbcType=LONGVARCHAR},",
          "activity_vids = #{activityVids,jdbcType=LONGVARCHAR},",
          "cover = #{cover,jdbcType=LONGVARBINARY},",
          "acontext = #{acontext,jdbcType=LONGVARCHAR}",
        "where activity_aid = #{activityAid,jdbcType=CHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(ActivityWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table activity
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update activity",
        "set activity_uid = #{activityUid,jdbcType=CHAR},",
          "cover_name = #{coverName,jdbcType=VARCHAR},",
          "atitle = #{atitle,jdbcType=VARCHAR},",
          "acreate = #{acreate,jdbcType=VARCHAR},",
          "activity_status = #{activityStatus,jdbcType=INTEGER}",
        "where activity_aid = #{activityAid,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(Activity record);
}